package com.principle.prototype.improve;


import com.principle.prototype.improve.Sheep;

public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom", 1, "白色");
        sheep.friend=new Sheep("1",1,"褐色");
        Sheep clone = (Sheep)sheep.clone();
        System.out.println(sheep.toString()+"sheep:"+sheep.hashCode()+",friend:"+sheep.friend.hashCode());
        System.out.println(clone.toString()+"clone:"+clone.hashCode()+",friend:"+clone.friend.hashCode());
    }
}
